import { lazy } from 'react'
import { Navigate  } from 'react-router-dom'
import {DesktopOutlined} from "@ant-design/icons";
import { IMenuRoutes } from './element.tsx'
const Dashboard = lazy(() => import('@/views/Dashboard/index.tsx'))
const Workplace = lazy(() => import("@/views/Dashboard/Workplace/index.tsx"))
const dashboard: IMenuRoutes = {
    path: 'dashboard',
    element: <Dashboard />,
    key: '/dashboard',
    icon: <DesktopOutlined />,
    label: '首页',
    children: [
        {
            path: 'workplace',
            element: <Workplace />,
            key: '/dashboard/workplace',
            label: '工作台',
            parent: '/dashboard',
            title: '工作台'
        },
        {
            path: '*',
            element: <Navigate to={'/dashboard/workplace'} />,
            hide: 'false'
        }
    ]
}

export default dashboard